home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group98c.txt
/
000061_icon-group-sender _Sat Oct 17 09:18:43 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from ursus.CS.Arizona.EDU (ursus.CS.Arizona.EDU [192.12.69.63])
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) with SMTP id JAA11645
for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Sat, 17 Oct 1998 09:18:43 -0700 (MST)
Received: by ursus.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA08300; Sat, 17 Oct 1998 09:18:42 -0700
To: icon-group@optima.CS.Arizona.EDU
Date: Fri, 16 Oct 1998 08:37:32 GMT
From: r.raschke@quadstone.com (Robby)
Message-Id: <F0wvyK.DC0@cogsci.ed.ac.uk>
Organization: Quadstone Limited
Sender: icon-group-request@optima.CS.Arizona.EDU
References: <Pine.LNX.3.96.981013093657.8760A-100000@katto.kaapeli.fi>
Reply-To: r.raschke@quadstone.com
Subject: Re: A problem with sets
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
In article <Pine.LNX.3.96.981013093657.8760A-100000@katto.kaapeli.fi>,
Kimmo Kettunen <kettunen@kaapeli.fi> writes:
> Hello,
[...]
> During the stem synthesis I have pretty many string variables which may be
> altered during the process. Part of the variables are unnecessary and
> redundant, and to prune the results I put them all in the end into a set
> structure to get rid of redundant ones. Works fine, results are OK.
>
> BUT: now I do not know excactly, which variables I get out of the set as I
> see only the results, string values of the variables.
[...]
> Kimmo
>
Hmm, you could use a table (aka associative array) instead. Say you
have a bunch of variables a to z, you can build a table indexed by
the variable values having the name of the variable as the associated
value:
mytable := table(0)
mytable[a] := name(a)
...
mytable[z] := name(z)
Since indices are unique, you'll always end up with a string being
associated with the last variable that contained the string that you
added to the table, eg. if a and b contain the same string the value of
mytable[a] and mytable[b] will be "b" after the above statements.
variable("b") gets you back to the original variable, eg.
variable(mytable[a]) = b
I didn't test any of this.
Robby